package com.jiangore.config.mybatisplus;

import org.mybatis.spring.annotation.MapperScan;
import org.springframework.context.annotation.Configuration;
import org.springframework.transaction.annotation.EnableTransactionManagement;

/**
 * Author: jiangtao
 * Date: 2018/12/24
 * Describe: Scan dao
 * @author Administrator
 */
@EnableTransactionManagement
@Configuration
@MapperScan({"com.example.module.*.dao"})
public class MybatisPlusConfig {

    //@Autowired
    //private DataSource dataSource;

    /*@Autowired
    private MybatisProperties properties;*/

    /*@Autowired
    private ResourceLoader resourceLoader = new DefaultResourceLoader();
    */
    /*@Autowired(required = false)
    private Interceptor[] interceptors;*/

    /*@Autowired(required = false)
    private DatabaseIdProvider databaseIdProvider;*/

    //@Autowired
    //private MyMetaObjectHandler myMetaObjectHandler;


    /**
     * mybatis-plus分页插件<br>
     * 文档：http://mp.baomidou.com<br>
     */
    /*@Bean
    public PaginationInterceptor myPaginationInterceptor() {
        PaginationInterceptor paginationInterceptor = new PaginationInterceptor();
        paginationInterceptor.setDialectType("sqlserver");
        return paginationInterceptor;
    }*/

    /**
     * @Deprecated
     * mybatis-plus SQL执行效率插件【生产环境可以关闭】
     */
    /*@Bean
    public PerformanceInterceptor myPerformanceInterceptor() {
        PerformanceInterceptor performanceInterceptor = new PerformanceInterceptor();
        //QL 执行性能分析，开发环境使用，线上不推荐。 maxTime 指的是 sql 最大执行时长
        performanceInterceptor.setMaxTime(10000);
        //SQL是否格式化 默认false
        performanceInterceptor.setFormat(true);
        return performanceInterceptor;
    }*/

}
